home *** CD-ROM | disk | FTP | other *** search
/ SuperHack / SuperHack CD.bin / CODING / SOUND / PLAY_SRC.ZIP / PLAY.ASM < prev    next >
Encoding:
Assembly Source File  |  1994-11-22  |  2.3 KB  |  81 lines

  1. .386p
  2. jumps
  3.  
  4. code32    segment para public use32
  5.         assume cs:code32, ds:code32
  6.  
  7. Include Pmode.inc
  8. ;▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  9. ;                      Global Definitions for the Player
  10. ;▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
  11. Global AMS_Init:Near,AMS_LoadModule:Near,AMS_ErrorHandler:Near,AMS_ShutDown:Near
  12. Global AMS_ReadCommandLine:Near,AMS_StartModule:Near,AMS_StopModule:Near
  13.  
  14. Global ModName:Byte,PositionJump:Byte
  15. Global LoadOffset:Dword,OwnMemory:Dword
  16.  
  17. Public _Main
  18. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  19. ;                               The Main Routine
  20. ;▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
  21. _Main:
  22.         call    AMS_Init                ;Init everyting
  23.         call    AMS_ReadCommandLine     ;Read the commandline
  24.                                         ;and put it in "Modname"
  25.         call    AMS_LoadModule          ;Load the modules specified in "Modname"
  26.         call    AMS_StartModule         ;Start the playing.
  27.  
  28. Waiting:
  29.         in      al,60h
  30.         cmp     al,1
  31.         jnz     Waiting
  32.  
  33.  
  34.         call    AMS_StartModule         ;Stops the playing.
  35.         call    AMS_ShutDown            ;Shut down the MusicSystem
  36.  
  37.         jmp     _exit
  38.  
  39.  
  40. ;──────────────────────────────────────────────────────────────────────────────
  41. ;When reaching this code, some Problem occured.
  42. ;
  43. ; * ESI points to a text string that describes the error
  44. ;
  45. ; You may replace the following code with an own errorhandler if you wish,
  46. ; This is just an example.
  47. ;
  48. ;──────────────────────────────────────────────────────────────────────────────
  49. AMS_Errorhandler:
  50. ;       mov     V86R_AX,3       ;Set Screen Mode
  51. ;       mov     al,10h
  52. ;       int     33h
  53.         call    PrintText
  54.         jmp     _Exit
  55.  
  56.  
  57. ;─────────────────────────────
  58. ;Prints a text in textmode
  59. ;Calls: ESI = Offset to  text
  60. ;─────────────────────────────
  61. PrintText       Proc    Near
  62.         Pushad
  63.         mov     edx,esi
  64.         add     edx,_code32a
  65.     ror    edx,4
  66.     mov    V86R_DS,dx
  67.     shr    edx,28
  68.         mov     V86R_DX,dx
  69.         mov     V86R_AH,9
  70.         mov     al,21h
  71.         int     33h
  72.         Popad
  73.         Ret
  74. PrintText       EndP
  75.  
  76.  
  77.  
  78. code32  ends
  79.         end
  80.  
  81.